Current panic() of hypervisor doesn't stop all cpus.
So domains can work after hypervisor panic (when using
noreboot option). If dom0 continues to work after
xen panic, the system may get into serious problems.
This patch fixes the issue.
I chose cpu_halt() to stop other cpus by smp_send_stop().
I think it should work fine for kexec. machine_halt()
is only spinloop for leaving the panic calltrace.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
cpu_clear(smp_processor_id(), cpu_online_map);
max_xtp();
local_irq_disable();
-#ifndef XEN
cpu_halt();
-#endif
}
void
{
max_xtp();
local_irq_disable();
-#ifndef XEN
cpu_halt();
-#endif
/* Should never be here */
BUG();
for (;;);
void machine_halt(void)
{
console_start_sync();
- if (running_on_sim)
- printk ("machine_halt called. spinning...\n");
- else
- cpu_halt();
+
+#ifdef CONFIG_SMP
+ smp_send_stop();
+#endif
+
+ printk ("machine_halt called. spinning...\n");
while(1);
}